@extends('layouts.admin')

@section('title', '产销信息')

@section('content')
    <ol class="breadcrumb">
        <li class="breadcrumb-item">后台管理</li>
        <li class="breadcrumb-item active">求购信息</li>
    </ol>
    <div class="content-div">
        <form method="post">
            @csrf
            <table cellpadding="0" cellspacing="0" border="0" width="100%" class="dsxui-listtable">
                <thead>
                <tr>
                    <th width="30"><input type="checkbox" data-action="checkall"></th>
                    <th>标题</th>
                    <th>用户</th>
                    <th>点击</th>
                    <th width="150">发布时间</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($items as $item)
                    <tr>
                        <td><input type="checkbox" name="items[]" value="{{$item['id']}}" class="checkmark"></td>
                        <td><a href="{{url('app/productnews/detail/'.$item['id'].'.html')}}" target="_blank">{{$item['title']}}</a></td>
                        <td>{{$item['user']['username']}}</td>
                        <td>{{$item['views']}}</td>
                        <td>{{@date('Y-m-d H:i:s', $item['created_at'])}}</td>
                    </tr>
                @endforeach
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="20">
                        <div class="pagination float-right">{{$pagination}}</div>
                        <div class="btn-group-sm">
                            <label class="form-check-label"><input type="checkbox" data-action="checkall"> 全选</label>
                            <button type="submit" class="btn btn-default btn-action">批量删除</button>
                            <button type="button" class="btn btn-default btn-action" data-action="refresh">刷新</button>
                        </div>
                    </td>
                </tr>
                </tfoot>
            </table>
        </form>
    </div>
@stop
